package com.example.administrator.uis.view

import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View

/**
 * Created by Administrator on 2017/11/10 0010.
 */
class PracticeDrawOvalView : View {
    constructor(context: Context?) : super(context) {
    }

    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
    }

    constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(context, attrs, defStyle) {

    }

    override fun onDraw(canvas: Canvas?) {
        super.onDraw(canvas)
        var paint = Paint(Paint.ANTI_ALIAS_FLAG)
        var rect = RectF(10f, 20f, 90f, 100f)
        canvas?.drawOval(rect, paint)

    }

}